package cn.lyvust.init;

/**
 * Description:默认构造函数/构造函数重载
 * date: 2021-4-6 22:22
 *
 * @author Guo_guo
 * @since JDK 1.8
 */
public class StudentTest {
    public static void main(String[] args) {
        Student zhang = new Student();
//        zhang.work();

        /*Student[] stus=new Student[3];
		Student s1=new Student();
		s1.name="张三";
		s1.score=40;
		Student s2=new Student();
		s2.name="李四";
		s2.score=90;
		Student s3=new Student();
		s3.name="王五";
		s3.score=43;
		stus[0]=s1;
		stus[1]=s2;
		stus[2]=s3;*/
        Student[] stus=new Student[]{new Student("张三",40),new Student("李四",90),new Student("王五",43)};

        StudentTest test = new StudentTest();
        test.showInfo(stus);
    }

    //输出学员信息
    public void showInfo(Student[] stus){
        for(Student stu:stus){
            stu.showInfo();
        }
    }
}
